<link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/frontend') ?>/css/jquery.simpleLens.css">
<script type="text/javascript" src="<?php echo base_url('assets/frontend') ?>/js/jquery.simpleLens.js"></script>
<script type="text/javascript" src="<?php echo base_url('assets/frontend') ?>/js/jquery.simpleGallery.js"></script>
<article>
    <div id="breadcrumb">
        <ul>
            <li><a href="#">Trang chủ</a></li>
            <li><a href="#">Máy lọc nước</a></li>
            <li><span><?= $detailproduct->title ?></span></li>
        </ul>
    </div><!--End #breadcrumb-->

    <div id="product-content">
        <div id="show-product">
            <div class="simpleLens-gallery-container" id="demo-1">
                <div class="simpleLens-container">
                    <div class="simpleLens-big-image-container">
                        <a class="simpleLens-lens-image" data-lens-image="<?= $detailproduct->img1; ?>">
                            <img src="<?= $detailproduct->img1; ?>" class="simpleLens-big-image">
                        </a>
                    </div>
                </div>

                <div class="simpleLens-thumbnails-container">
                    <?php if (isset($detailproduct->img1) && $detailproduct->img1 != "") { ?>
                        <a href="#" class="simpleLens-thumbnail-wrapper"
                           data-lens-image="<?= $detailproduct->img1; ?>"
                           data-big-image="<?= $detailproduct->img1; ?>">
                            <img src="<?= $detailproduct->img1; ?>">
                        </a>
                    <?php } ?>
                    <?php if (isset($detailproduct->img2) && $detailproduct->img2 != "") { ?>
                        <a href="#" class="simpleLens-thumbnail-wrapper"
                           data-lens-image="<?= $detailproduct->img2; ?>"
                           data-big-image="<?= $detailproduct->img2; ?>">
                            <img src="<?= $detailproduct->img2; ?>">
                        </a>
                    <?php } ?>
                    <?php if (isset($detailproduct->img3) && $detailproduct->img3 != "") { ?>
                        <a href="#" class="simpleLens-thumbnail-wrapper"
                           data-lens-image="<?= $detailproduct->img3; ?>"
                           data-big-image="<?= $detailproduct->img3; ?>">
                            <img src="<?= $detailproduct->img3; ?>">
                        </a>
                    <?php } ?>
                    <?php if (isset($detailproduct->img4) && $detailproduct->img4 != "") { ?>
                        <a href="#" class="simpleLens-thumbnail-wrapper"
                           data-lens-image="<?= $detailproduct->img4; ?>"
                           data-big-image="<?= $detailproduct->img4; ?>">
                            <img src="<?= $detailproduct->img4; ?>">
                        </a>
                    <?php } ?>

                </div>
            </div>

            <script>
                $(document).ready(function(){
                    $('#demo-1 .simpleLens-thumbnails-container img').simpleGallery({
                        loading_image: 'demo/images/loading.gif'
                    });

                    $('#demo-1 .simpleLens-big-image').simpleLens({
                        loading_image: 'demo/images/loading.gif'
                    });
                });
            </script>
        </div><!--Edn #show-product-->

        <div id="product-info">
            <h1 class="product-name"><?php echo $detailproduct->title;?></h1>

            <div class="product-short-description">
                <?php echo $detailproduct->description1;?>
            </div><!--End Product Short Description-->

            <div class="spacer-buy-area">
                <table>
                    <tbody><tr>
                        <td style="width: 130px;"><span>Nhà sản suất:</span></td>
                        <td><span class="company"><?php echo $detailproduct->origin_name; ?></span></td>
                    </tr>
                    <tr>
                        <td><span>Tình trạng hàng:</span></td>
                        <td><span class="status">
                                <p><?php if($detailproduct->rate != ""){
                                        if($detailproduct->rate == "1"){
                                            echo "Còn hàng";
                                        }elseif($detailproduct->rate == "2") {
                                            echo "Hết hàng";
                                        }elseif ($detailproduct->rate == "3") {
                                            echo "Sắp có hàng";
                                        }else {
                                            echo "Còn hàng";
                                        }

                                    }else { echo "Còn hàng"; } ?></p>
                            </span></td>
                    </tr>
                    <tr>
                        <td><span>Giá thị trường:</span></td>
                        <td><span class="public-price"><?php echo number_format($detailproduct->priceny);?> VNĐ</span></td>
                    </tr>
                    <tr>
                        <td><span>Giá bán:</span></td>
                        <td><span class="sell-price"><?php echo number_format($detailproduct->price);?>  VNĐ</span></td>
                    </tr>
                    </tbody></table>
            </div><!--End Spacer Buy Area-->

            <div class="add-to-cart">
                <a href="<?php echo base_url(). mb_strtolower(url_title(removesign( $detailproduct->title))).'-dh-'.$detailproduct->p_id;?>" class="btn-buy">Mua hàng</a>
            </div>
            <div style="clear: both"></div>
        </div>
    </div>

    <div id="product-content-detail">
        <div id="task">
            <h5>Thông tin chi tiết</h5>
        </div>
        <div id="content">
            <?php echo $detailproduct->description2;?>
        </div>
    </div><!--End #product-content-detail-->

    <div style="clear: both"></div>
</article>